﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Styx.TreeSharp;
using Styx;
using Action = Styx.TreeSharp.Action;

namespace HolySword.Helpers
{
    class AttackManager
    {
        public static Composite CreateAutoAttack()
        {
            return new PrioritySelector(
                new Decorator(
                    ret => !StyxWoW.Me.IsAutoAttacking,
                    new Action(ret =>
                    {
                        StyxWoW.Me.ToggleAttack();
                        return RunStatus.Failure;
                    }))
                );
        }
    }
}
